package zuoye2;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;


public class IntTest1 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        Collections.addAll(list,20,30,24,46,12,45);
        Collections.shuffle(list);//对集合中的数据打乱顺序
        System.out.println(list);

        Collections.sort(list);//对集合中的数据进行升序排序
        System.out.println(list);

        Collections.sort(list,(o1, o2) -> o2-o1);
        System.out.println(list);


    }
}
